//
//  ClearCell.m
//  ECO
//
//  Created by zl on 2019/9/24.
//  Copyright © 2019 谷银行. All rights reserved.
//

#import "ClearCell.h"

@implementation ClearCell
- (UIButton *)BackGroudBtn{
    if (!_BackGroudBtn) {
        _BackGroudBtn = [[UIButton alloc]initWithFrame:CGRectMakeCustom(0, 0, 320, 47)];
        [_BackGroudBtn addTarget:self action:@selector(BackBtn:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _BackGroudBtn;
}
- (UILabel *)Title{
    if (!_Title) {
        _Title = [[UILabel alloc]initWithFrame:CGRectMakeCustom(15, 13, 100, 21)];
    }
    return _Title;
}
- (UILabel *)DetailText{
    if (!_DetailText) {
        _DetailText = [[UILabel alloc]initWithFrame:CGRectMakeCustom(320-100-14, 13, 100, 21)];
        _DetailText.textColor = [UIColor colorWithHexString:@"#999999"];
        _DetailText.font = [UIFont systemFontOfSize:12 * autoSizeScaleX];
        _DetailText.textAlignment = 2;
    }
    return _DetailText;
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self == [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self.contentView addSubview:self.BackGroudBtn];
        [self.BackGroudBtn addSubview:self.Title];
        [self.BackGroudBtn addSubview:self.DetailText];
    }
    return self;
}
- (void)BackBtn:(UIButton *)send{
    if (self.delegate && [self.delegate respondsToSelector:@selector(ClearCellClick:)]) {
        [self.delegate performSelector:@selector(ClearCellClick:) withObject:nil];
    }
}
@end
